[gd_scene load_steps=11 format=1]

[ext_resource path="res://scripts/weapons/shot_base.gd" type="Script" id=1]
[ext_resource path="res://scripts/shader/ship.tres" type="Shader" id=2]
[ext_resource path="res://images/weapons/grenade01_n.png" type="Texture" id=3]
[ext_resource path="res://images/weapons/grenade01_c.png" type="Texture" id=4]
[ext_resource path="res://images/particles/explosion02.png" type="Texture" id=5]

[sub_resource type="CircleShape2D" id=1]

custom_solver_bias = 0.0
radius = 32.0

[sub_resource type="CanvasItemMaterial" id=3]

shader/shader = ExtResource( 2 )
shader/shading_mode = 0
shader_param/normal = ExtResource( 3 )

[sub_resource type="Gradient" id=4]

offsets = FloatArray( 0, 0.430566, 1 )
colors = ColorArray( 1, 1, 1, 0, 1, 1, 1, 1, 0.752941, 0.752941, 0.752941, 0 )

[sub_resource type="Animation" id=5]

length = 1.0
loop = false
step = 0.1

[sub_resource type="Animation" id=6]

resource/name = "fade_out"
length = 1.5
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:visibility/self_opacity")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = { "times":FloatArray( 0, 0.4, 0.5 ), "transitions":FloatArray( 1, 1, 1 ), "update":0, "values":[ 1.0, 1.0, 0.0 ] }
tracks/1/type = "value"
tracks/1/path = NodePath("Explosion:config/emitting")
tracks/1/interp = 1
tracks/1/imported = false
tracks/1/keys = { "times":FloatArray( 0, 0.4 ), "transitions":FloatArray( 1, 1 ), "update":1, "values":[ true, false ] }
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/imported = false
tracks/2/keys = { "times":FloatArray( 1.5 ), "transitions":FloatArray( 1 ), "values":[ { "args":[  ], "method":"queue_free" } ] }

[node name="Grenade" type="Area2D"]

input/pickable = true
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 1 )
__meta__ = { "__editor_plugin_screen__":"2D" }

[node name="Sprite" type="Sprite" parent="."]

material/material = SubResource( 3 )
transform/scale = Vector2( 0.8, 0.8 )
texture = ExtResource( 4 )

[node name="Explosion" type="Particles2D" parent="."]

visibility/blend_mode = 1
visibility/light_mask = 0
config/amount = 8
config/lifetime = 1.0
config/emitting = false
config/half_extents = Vector2( 0, 6 )
config/explosiveness = 0.5
config/texture = ExtResource( 5 )
params/direction = 360.0
params/spread = 180.0
params/linear_velocity = 12.0
params/spin_velocity = 1.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 2.0
params/initial_angle = 0.0
params/initial_size = 0.01
params/final_size = 0.2
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
randomness/linear_velocity = 0.5
randomness/spin_velocity = 1.0
randomness/initial_angle = 1.0
randomness/initial_size = 0.5
color/color_ramp = SubResource( 4 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

visibility/visible = false
shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

[node name="Timer" type="Timer" parent="."]

process_mode = 1
wait_time = 0.6
one_shot = true
autostart = false

[node name="Anim" type="AnimationPlayer" parent="."]

playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/create = SubResource( 5 )
anims/fade_out = SubResource( 6 )
playback/active = true
playback/speed = 1.0
blend_times = [  ]
autoplay = "create"

[connection signal="body_enter" from="." to="." method="_on_body_enter"]

[connection signal="timeout" from="Timer" to="." method="disable"]


